package com.itmumu.goodsconsumer.configuration;

/**
 * Created by JachinLin on 2020/08/07.
 */

import com.itmumu.goodsconsumer.filter.SysInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
@Configuration
//将拦截器添加到SpringBoot配置中
public class SessionConfiguration extends WebMvcConfigurerAdapter{
    @Override
    public void addInterceptors(InterceptorRegistry registry){
        registry.addInterceptor(new SysInterceptor()).addPathPatterns("/goods/cart");
    }
}
